package cn.com.duiba.millionaire.center.biz.remoteservice;

import cn.com.duiba.millionaire.center.api.dto.MillionaireQuestionBagDto;
import cn.com.duiba.millionaire.center.api.dto.MillionaireQuestionDto;
import cn.com.duiba.millionaire.center.api.remoteservice.RemoteMillionaireQuesionBagService;
import cn.com.duiba.millionaire.center.api.requestParam.MillionaireQuestionBagRequestParam;
import cn.com.duiba.millionaire.center.biz.service.MillionaireQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by Administrator on 2018/1/20.
 */
@RestController
public class RemoteMillionaireQuesionBagServiceImpl implements RemoteMillionaireQuesionBagService {

    @Autowired
    private MillionaireQuestionService millionaireQuestionService;

    @Override
    public Integer countMillionaireQuestionBagBackendList(MillionaireQuestionBagRequestParam param) {
        return millionaireQuestionService.countMillionaireQuestionBagBackendList(param);
    }

    @Override
    public List<MillionaireQuestionBagDto> getMillionaireQuestionBagList(
            MillionaireQuestionBagRequestParam param) {
        return millionaireQuestionService.getMillionaireQuestionBagList(param);
    }

    @Override
    public Boolean saveOrUpdateMillionaireQuestionBag(MillionaireQuestionBagDto dto) {
        return millionaireQuestionService.saveOrUpdateMillionaireQuesionBag(dto);
    }

    @Override
    public List<MillionaireQuestionDto> findAllMillionaireQuestionByBagId(Long id) {
        return millionaireQuestionService.findAllMillionaireQuesionByBagId(id);
    }

    @Override
    public Boolean saveOrUpdateMillionaireQuestion(MillionaireQuestionDto dto) {
        return millionaireQuestionService.saveOrUpdateMillionaireQuesion(dto);
    }

    @Override
    public Boolean delete(Long id, Integer type) {
        return millionaireQuestionService.delete(id, type);
    }

    @Override
    public MillionaireQuestionDto findQuesiontById(Long id) {
        return millionaireQuestionService.findQuesionById(id);
    }

    @Override
    public MillionaireQuestionDto findQuestionByActivityIdAndIndex(Long activityId, Integer index) {
        return millionaireQuestionService.findQuestionByActivityIdAndIndex(activityId,index);
    }
}
